<#include "../../common/commonattribute.html"/>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
</head>
<script>

//            $.ajax({
//                type: "POST",
//                url:url+"true",
//                async: true,
//                success: function(data){
//                    if(data.status==1){
//                        $(this).alertmsg("ok","启动成功")
//                        $(obj).find("span").removeClass("glyphicon glyphicon-pause");
//                        $(obj).find("span").addClass("glyphicon glyphicon-play");}
//                        else{
//                        $(this).alertmsg("error","启动失败")
//                    }
//                }
//            });

</script>
<body>
<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${ctx}/frame/database/list" method="post">

        <div class="bjui-searchBar">
            <a href="${ctx}/frame/database/edit" data-isrefsh="true"  class="btn btn-green" data-icon="plus" data-width="800" data-mask="true" data-height="400" data-toggle="dialog" data-id="database-add" data-title="数据结构新增">新增</a>
            <a class="btn btn-green" href="javascript:;" data-toggle="dialog"  data-icon="sign-out">导出</a>
            <a class="btn btn-red" href="${ctx}/frame/database/delete" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids"  data-icon="remove">删除</a>

            <a class="btn btn-blue search-database" href="javascript:;" data-toggle="reloadsearch" data-clear-query="true" data-icon="undo">刷新</a>


            <div class="pull-right">
                <label>表名称：</label><input type="text" id="customNo" name="tableSqlName" value="${entity.tableSqlName!}" class="form-control" size="10">&nbsp;
                <label>表中文名称：</label><input type="text"  name="tableZhName" class="form-control" value="${entity.tableZhName!}" size="8">&nbsp;

                <button type="button" data-toggle="moresearch" data-name="custom"><i class="fa fa-angle-double-down"></i></button>
                <button type="submit" class="btn-blue">查询</button>&nbsp;


            </div>
        </div>
        <div class="bjui-moreSearch">
            <label>职业：</label><input type="text" value="" name="profession" size="15" />
            <label>&nbsp;性别:</label>
            <select name="sex" data-toggle="selectpicker">
                <option value="">全部</option>
                <option value="true">男</option>
                <option value="false">女</option>
            </select>
            <label>&nbsp;手机:</label>
            <input type="text" value="" name="mobile" size="10">
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table  table-hover table-striped table-top table-bordered" data-selected-multi="true">
        <thead>
        <tr>
            <th align="center" style="width:20px"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
            <th align="center" style="width:40px">序号</th>
            <th align="center">表名称</th>

            <th align="center">表中文名称</th>
            <th align="center">操作</th>
        </tr>
        </thead>
        <tbody>
        <#if entitys??>
            <#list entitys as database>
                <tr data-id="${database.id}"><td align="center"><input type="checkbox" name="ids"  value="${database.id}" data-toggle="icheck"></td>
                    <td align="center">${database_index+(pageCurrent?default(1)-1)*(pageSize?default(10))+1}</td>
                    <td align="center">${(database.tableSqlName)!}</td>
                    <td align="center">${(database.tableZhName)!}</td>
                    <td align="center"><a href="${ctx}/frame/database/edit?id=${(database.id)!}"  data-toggle="dialog" data-title="编辑数据结构" data-width="800" data-mask="true" data-height="400"   class="btn btn-default"><i class="fa fa-edit" aria-hidden="true"></i></a>
                    <a href="${ctx}/frame/database/view?id=${(database.id)!}" data-width="800" data-mask="true" data-height="400" data-title="查看数据结构"    data-toggle="dialog"  class="btn btn-default"><i class="fa fa-eye" aria-hidden="true"></i></a>
                    <a href="${ctx}/frame/frametable/list?tableId=${(database.id)!}" data-id="table-list"  data-title="字段管理"    data-toggle="navtab"  class="btn btn-default"><i class="fa fa-legal" aria-hidden="true"></i></a>
                    <a href="${ctx}/frame/codingPage?tableName=${database.tableZhName!}&sqlTableName=${database.tableSqlName}" data-width="400" data-mask="true" data-height="300" data-title="生成代码"    data-toggle="dialog"  class="btn btn-default"><i class="fa fa-code" aria-hidden="true"></i></a>
                    </td>
                </tr>
            </#list>
        </#if>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-toggle-change="changepagesize">
                <option value="10">10</option>
                <option value="20">20</option>
                <option value="30">30</option>
            </select>
        </div>
        <span>&nbsp;条，共 ${total!} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="${total!}">
    </div>
</div>
</body>
</html>